package com.cnplan.core;

/**
 * Created by Administrator on 2018/4/27.
 */
public class MyUtils {
    public static String formatKeyword(String keyword) {
        if (keyword != null) {
            if (keyword.endsWith(",")) {
                keyword = "";
            } else {
                String[] elements = keyword.split(",");
                if (elements.length > 1) {
                    keyword = elements[elements.length - 1];
                }
                keyword = keyword.trim();
            }
        }
        return keyword;
    }

}
